{% extends "base.html" %}
{% load i18n %}
{% load markup %}

{% block title %}{% trans "Podcasts" %} - {{ year }}{% endblock %}

{% block extrahead %}
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" 
      href="http://{{ site.domain }}/rss/podcasts/" />
<link rel="alternate" type="application/atom+xml" title="Atom 1.0" 
      href="http://{{ site.domain }}/atom/podcasts/" />
{% endblock %}

{% block content %}
<h2>{% trans "Podcasts" %}</h2>
<p class="subscribe"><a href="itpc://{{ site.domain }}/rss/podcasts/">Subscribe with iTunes to all {{ site }} podcasts</a></p>
<h4>Archive for {{ year }}</h4>
{% for podcast in object_list %}
<div>
  <h4><a href="{{ podcast.channel.get_absolute_url }}">{{ podcast.channel.name }}</a></h4>
  <h3><a href="{{ podcast.get_absolute_url }}">{{ podcast.title }}</a></h3>
  <p class="date">{{ podcast.pub_date|date:"l, F jS, Y" }}</p>
  {% ifnotequal podcast.summary "" %}{{ podcast.summary|markdown|truncatewords:20 }}{% endifnotequal %}
  <ul>
    <li><a href="{{ podcast.get_audio_url }}">Download the mp3 for this episode</a> (right-click and save as)</li> 
    <li><a href="itpc://{{ site.domain }}/rss/podcasts/{{ podcast.channel.slug }}">Subscribe to {{ podcast.channel.name }} in iTunes</a></li>
  </ul>
</div>
{% endfor %}
{% endblock %}
